<?php
if (!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
require_once DISCUZ_ROOT . './source/function/function_cache.php';

class plugin_kuaipan {
	
}

class plugin_kuaipan_forum extends plugin_kuaipan {

	function post_editorctrl_left() {
		return "<a href=\"javascript:;\" id=\"upload-file\" title=\"".lang('plugin/kuaipan', 'uploadToKuaipan')."\">".lang('plugin/kuaipan', 'kuaipan')."</a>";
	}

	function post_middle() {
		@include DISCUZ_ROOT . './data/sysdata/cache_kuaipan.php';
		if(empty($app_key)){
			$app_key = "-1";
		}else{
			global $_G;
			$parse_url =  parse_url($_G['siteurl']);
			$host = $parse_url['host'];			
			$app_key = $app_key . "-" . MD5($app_key.$host);
		}
		$uploadTemplate = ' <link rel="stylesheet" type="text/css" href="http://web.kuaipan.cn/static/fujiantong/2013/kuaipan.css" charset="utf-8"/>
							<script>
								var kuaipanUid = "' . $_G['uid'] . '";
								var kuaipanKey = "'. $app_key . '";			
							</script>
							<script type="text/javascript" src="http://web.kuaipan.cn/static/fujiantong/2013/js/fujiantongall-min.js?v=' . time() . '" charset="utf-8"></script> ';
		return $uploadTemplate;
	}

}
class plugin_kuaipan_group extends plugin_kuaipan_forum {
}
